<template>
    <el-dialog title="新增学生" modal width="50%" modal-append-to-body top="10%" center :visible.sync="isShowSaveStudent" @close='emitToParent' :before-close="emitToParent">
        <el-form :model="form">
            <el-form-item label="活动名称" :label-width="formLabelWidth">
                <el-input autocomplete="off"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="emitToParent">取 消</el-button>
            <el-button type="primary" @click="emitToParent">确 定</el-button>
        </div>
    </el-dialog>
</template>

<script>
    export default {
        name: "SaveStudent",
        props: {
            isShowSaveStudent:{
                type: Boolean,
                default: true
            }
        },
        data() {
            return {
                gridData: [{
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }],
                form: {
                    name: '',
                    region: '',
                    date1: '',
                    date2: '',
                    delivery: false,
                    type: [],
                    resource: '',
                    desc: ''
                },
                formLabelWidth: '120px',
            };
        },
        methods: {
            // 关闭回调，自组件不能修改父组件传来的值
            emitToParent() {
                this.$emit('closeEvent', false);
            }
        }
    }
</script>

<style scoped>

</style>
